package game.module.qzmj.logic;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import game.RoomServer;
import game.module.qzmj.bean.QzmjRound;


public class QzmjEstimateUserRespondHelper {
	private static Logger logger = LoggerFactory.getLogger(QzmjEstimateUserRespondHelper.class);

	static class SingletonHolder {
		static QzmjEstimateUserRespondHelper instance = new QzmjEstimateUserRespondHelper();
	}

	public static QzmjEstimateUserRespondHelper getInstance() {
		return SingletonHolder.instance;
	}

	public void analycardHelp(final byte wCenterUser, final byte cbCenterCard, final int EstimatKind,
			final QzmjRound mjround,final int m_wCurrentUser) {

		RoomServer.executorService.execute(new Runnable() {

			@Override
			public void run() {
				long startMili = System.currentTimeMillis();
           //     int a =0;
				// TODO Auto-generated method stub
                
				boolean bAroseAction = QzmjLogic.getInstance().EstimateUserRespond(wCenterUser, cbCenterCard, EstimatKind, mjround);
				mjround.setM_wResumeUser(m_wCurrentUser);
				if (bAroseAction == false) {
					// logger.info("here={}",cbCardData);
					QzmjLogic.getInstance().DispatchCardData(m_wCurrentUser, true, mjround);
				}
				logger.info("executorService cost time = {}ms",System.currentTimeMillis()-startMili);
			}

		});
	}
}
